package com.xhj.bigfactory.bigFactory.spring;

import org.springframework.context.support.ClassPathXmlApplicationContext;
/** @author haijianxia pure_xhj@163.com @Date 2021-08-26 @Time 11:34 */
public class SpringCircularDependencyDemo {
  public static void main(String[] args) {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
    A a = context.getBean("a", A.class);
    B b = context.getBean("b", B.class);
    //    System.out.println("a = " + a);
    //    System.out.println("b = " + b);
    //    System.out.println("a = " + a.hashCode());
    //    System.out.println("b = " + b.hashCode());
    System.out.println("====================================================");

    //    C c = context.getBean("c", C.class);
    //    D d = context.getBean("d", D.class);
    System.out.println("====================================================");
  }
}
